﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Domain.Model.Form>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Model.Name %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Model.Name %></h2>

    <table>
        <tr>
            <th>
                Position
            </th>
            <th>
                Name
            </th>
                <th>
                Type
            </th>
        </tr>

    <% foreach (var item in Model.FormElements) { %>
    
        <tr>
            <td>
                <%: item.Position %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Type %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p> 
        <%: Html.ActionLink("Edit this form", "Edit", new { id = Model.Id })%>
    </p>

</asp:Content>
